package imse.team0.inventoryws;

import imse.team0.inventoryws.parameters.NotAvailableException;
import imse.team0.inventoryws.parameters.OrderBookStatus;
import imse.team0.orders.Order;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.util.List;

/**
 * @author Eugen, 4/28/12 2:32 PM
 */
@WebService(targetNamespace = "http://inventoryws.team0.imse", name = "WarehousePortType")
public interface IWarehouseWS {
    @WebResult(name = "orderStatus", targetNamespace = "http://parameters.inventoryws.team0.imse", partName = "inventoryInquiryReply")
    @WebMethod(action = "http://inventoryws.team0.imse/BookOrder")
    public OrderBookStatus bookOrder(
            @WebParam(partName = "order", name = "order", targetNamespace = "http://parameters.inventoryws.team0.imse")
            Order order) throws NotAvailableException;
    @WebResult(name = "orderStatus", targetNamespace = "http://parameters.inventoryws.team0.imse", partName = "inventoryInquiryReply")
    @WebMethod(action = "http://inventoryws.team0.imse/ReplenishRequest")
    public OrderBookStatus replenishRequest(
            @WebParam(partName = "replenishList", name = "replenishItems", targetNamespace = "http://parameters.inventoryws.team0.imse")
            List<Order.OrderItem> replenishItems,
            @WebParam(partName = "inventoryID", name = "localInventoryID", targetNamespace = "http://parameters.inventoryws.team0.imse")
            String localInventoryID) throws NotAvailableException;
}
